package com.example.productservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class ProductserviceApplication {

  public static void main(String[] args) {
    SpringApplication.run(ProductserviceApplication.class, args);
  }

  @RequestMapping(value = "hello", method = RequestMethod.GET)
  public ResponseEntity<String> hello() {
    return  new ResponseEntity<>("hello product service ", HttpStatus.OK);
  }

  @RequestMapping(value = "test", method = RequestMethod.GET)
  public ResponseEntity<String> test() {
    return  new ResponseEntity<>("test product service ", HttpStatus.OK);
  }
}
